<div class="file-wrapper">
    {volist name="list_dir" id="v"}
        {if is_file($full_path.'/'.$v)}

            {switch $v|suffix}
                {case mp3}
                    <a href="/index/play?path={$path}/{$v}" title="{$v}">
                        <div class="music-wrapper">
                            <p class="music-icon">
                                <i class="iconfont">{$v|suffix|icon}</i>
                            </p>
                            <p class="music-name">{$v}</p>
                            <p class="music-time">
                                {:date('m/d H:i', filemtime($full_path.'/'.$v))}
                            </p>
                            <p class="music-size">
                                {:transByte(filesize($full_path.'/'.$v))}
                            </p>
                        </div>
                    </a>
                {/case}

                {case mp4|m3u8|lxe}
                    <a href="/index/play?path={$path}/{$v}" title="{$v}">
                        <div class="video-wrapper">
                            <p class="video-icon">
                                <i class="iconfont">{$v|suffix|icon}</i>
                            </p>
                            <p class="video-name">{$v}</p>
                            <p class="video-time">
                                {:date('m/d H:i', filemtime($full_path.'/'.$v))}
                            </p>
                            <p class="video-size">
                                {:transByte(filesize($full_path.'/'.$v))}
                            </p>
                        </div>
                    </a>
                {/case}

                {case png|jpeg|jpg}
                    <a href="/index/play?path={$path}/{$v}" title="{$v}">
                        <div class="img-wrapper">
                            <p class="img">
                                <img src="/disk/{$path}/{$v}" alt="{$v}">
                            </p>
                            <p class="img-name">{$v}</p>
                            <p class="img-time">
                                {:date('m/d H:i', filemtime($full_path.'/'.$v))}
                            </p>
                            <p class="img-size">
                                {:transByte(filesize($full_path.'/'.$v))}
                            </p>
                        </div>
                    </a>
                {/case}

                {case php|html|js|less|scss|css|py|c|cpp|txt|md}
                    <a href="/index/play?path={$path}/{$v}" title="{$v}">
                        <div class="code-wrapper">
                            <p class="code-icon">
                                <i class="iconfont">{$v|suffix|icon}</i>
                            </p>
                            <p class="code-name">
                                {$v}
                            </p>
                            <p class="code-time">
                                {:date('m/d H:i', filemtime($full_path.'/'.$v))}
                            </p>
                            <p class="code-size">
                                {:transByte(filesize($full_path.'/'.$v))}
                            </p>
                        </div>
                    </a>
                {/case}

                {case zip|gz|xz|bz2}
                    <a href="/disk{$path}/{$v}" title="{$v}">
                        <div class="zip-wrapper">
                            <p class="zip-icon">
                                <i class="iconfont">{$v|suffix|icon}</i>
                            </p>
                            <p class="zip-name">
                                {$v}
                            </p>
                            <p class="zip-time">
                                {:date('m/d H:i', filemtime($full_path.'/'.$v))}
                            </p>
                            <p class="zip-size">
                                {:transByte(filesize($full_path.'/'.$v))}
                            </p>
                        </div>
                    </a>
                {/case}

                {default /}
                    <a href="/disk{$path}/{$v}" title="{$v}">
                        <div class="other-wrapper">
                            <p class="other-icon">
                                <i class="iconfont">{$v|suffix|icon}</i>
                            </p>
                            <p class="other-name">
                                {$v}
                            </p>
                            <p class="other-time">
                                {:date('m/d H:i', filemtime($full_path.'/'.$v))}
                            </p>
                            <p class="other-size">
                                {:transByte(filesize($full_path.'/'.$v))}
                            </p>
                        </div>
                    </a>
            {/switch}

        {else /}
            <a href="/index/?path={$path}/{$v}" title="{$v}">
                <div class="folder-wrapper">
                    <p class="folder-icon">
                        <i class="iconfont">&#xe671;</i>
                    </p>
                    <p class="folder-name">
                        {$v}
                    </p>
                    <p class="folder-time">
                        {:date('m/d H:i', filemtime($full_path.'/'.$v))}
                    </p>
                </div>
            </a>
        {/if}
    {/volist}
</div>
